<?php

namespace app\common\model\banxi\student;

use app\common\model\banxi\subject\SubjectTeach;
use app\common\model\banxi\subject\SubjectTeachChapter;
use app\common\model\common\BaseModel;
use think\model\concern\SoftDelete;

/**
 * 全科课程学习记录
 */
class StudentSubjectTeachCollect extends BaseModel
{
    use SoftDelete;

    protected $name = 'banxi_student_subject_teach_collect';

    protected $autoWriteTimestamp = true;

    protected $deleteTime = 'del';

    protected $defaultSoftDelete = 0;

    protected $append = [
    ];
    protected $type = [
        'id' => 'string',
        'del' => 'string',
        'studentId' => 'string',
        'createTime' => 'timestamp:Y-m-d H:i:s',
        'updateTime' => 'timestamp:Y-m-d H:i:s',
    ];


    //-----------------------------------------------------------------------------------
    //｜                                   获取器                                       ｜
    //-----------------------------------------------------------------------------------


    //-----------------------------------------------------------------------------------
    //｜                                   处理方法                                       ｜
    //-----------------------------------------------------------------------------------

    //-----------------------------------------------------------------------------------
    //｜                                   模型关联                                       ｜
    //-----------------------------------------------------------------------------------
    public function subjectTeach()
    {
        return $this->belongsTo(SubjectTeach::class, 'subjectTeachId', 'id');
    }

    public function subjectTeachChapter()
    {
        return $this->belongsTo(SubjectTeachChapter::class, 'subjectTeachChapterId', 'id');
    }

}